package com.eorchis.module.trainingneeds.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import java.util.Date;
import com.eorchis.core.basedao.entity.impl.AbstractBaseEntity;


import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.module.basedata.domain.BaseData;
import com.eorchis.module.department.domain.Department;
import com.eorchis.module.user.domain.User;

/**
 * Title: Questionnaire<br>
 * Description: 问卷试题题型表实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author HuangTF
 * @createDate 2014-02-07
 * @version $Revision$
 */
@Entity
@Table(name = "QUESTIONNAIRE_QUESTION_TYPE")
public class QuestionnaireQuestionType extends AbstractBaseEntity implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	private String questionTypeId;//问卷试题题型ID
	private Questionnaire questionnaire;//问卷
	private BaseData questionType;//试题题型
	/**
	 * 获取问卷试题题型ID
	 */		
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="QUESTION_TYPE_ID")
	public String getQuestionTypeId() {
		return questionTypeId;
	}
	/**
	 * 设置问卷试题题型ID
	 */		
	public void setQuestionTypeId(String questionTypeId) {
		this.questionTypeId = questionTypeId;
	}
	/**
	 *  获取问卷
	 */		
	@ManyToOne(fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name="QUESTIONNAIRE_ID")
	public Questionnaire getQuestionnaire() {
		return questionnaire;
	}
	/**
	 * 设置问卷
	 */		
	public void setQuestionnaire(Questionnaire questionnaire) {
		this.questionnaire = questionnaire;
	}
	/**
	 * 获取试题题型
	 */		
	@ManyToOne( fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name = "QUESTION_TYPE", referencedColumnName = "DATA_CODE")
	public BaseData getQuestionType() {
		return questionType;
	}
	/**
	 * 设置试题题型
	 */		
	public void setQuestionType(BaseData questionType) {
		this.questionType = questionType;
	}
	/**
	 * 记录日志使用
	 */
	public String toString() {
		return "";
	}
}
